<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>OpenFOAM 中的壁面函数（四） | Giskard&#39;s CFD Learning Tricks</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="这篇来看看可能是最关键的 $\nu_t$ 的壁面函数。">
<meta property="og:type" content="article">
<meta property="og:title" content="OpenFOAM 中的壁面函数（四）">
<meta property="og:url" content="http://xiaopingqiu.github.io/2016/04/25/wallFunctions4/index.html">
<meta property="og:site_name" content="Giskard's CFD Learning Tricks">
<meta property="og:description" content="这篇来看看可能是最关键的 $\nu_t$ 的壁面函数。">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="OpenFOAM 中的壁面函数（四）">
<meta name="twitter:description" content="这篇来看看可能是最关键的 $\nu_t$ 的壁面函数。">
  
  
    <link rel="icon" href="/favicon.png">
  
  <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/css/style.css" type="text/css">
  
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

##ga('create', '[object Object]', 'auto');
ga('create', 'UA-62501686-1', 'auto');
ga('send', 'pageview');

</script>
<!-- End Google Analytics -->


</head>
<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Giskard&#39;s CFD Learning Tricks</a>
      </h1>
      
        <h2 id="subtitle-wrap">
          <a href="/" id="subtitle">CFD and Scientific Computing</a>
        </h2>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
          <a class="main-nav-link" href="/atom.xml">Rss</a>
        
          <a class="main-nav-link" href="/about">About</a>
        
      </nav>
      <nav id="sub-nav">
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="q" value="site:http://xiaopingqiu.github.io"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-wallFunctions4" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2016/04/25/wallFunctions4/" class="article-date">
  <time datetime="2016-04-24T16:43:40.000Z" itemprop="datePublished">2016-04-25</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/OpenFOAM/">OpenFOAM</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      OpenFOAM 中的壁面函数（四）
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>这篇来看看可能是最关键的 $\nu_t$ 的壁面函数。</p>
<a id="more"></a>
<h5 id="5-_湍流粘度_$\nu_t$_的壁面函数">5. 湍流粘度 $\nu_t$ 的壁面函数</h5><p>这个类型的壁面函数，结构比较简单，计算的是每一个壁面边界面上的湍流粘度 $\nu_t$。<br><code>nutWallFunction</code> 是虚基类，其中定义了一个纯虚函数 <code>calcNut</code><br><figure class="highlight cs"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">virtual</span> tmp&lt;scalarField&gt; <span class="title">calcNut</span><span class="params">()</span> <span class="keyword">const</span> </span>= <span class="number">0</span>;</span><br></pre></td></tr></table></figure></p>
<p>并且在 <code>updateCoeffs</code> 函数中，将 <code>calcNut</code> 的返回值赋值给边界面<br><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">void</span> nutWallFunctionFvPatchScalarField::updateCoeffs()</span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">if</span> (updated())</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">return</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">operator</span>==(calcNut());</span><br><span class="line"></span><br><span class="line">    fixedValueFvPatchScalarField::updateCoeffs();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>这样，在具体的那些计算 $\nu_t$ 的壁面函数中，只需要看 <code>calcNut</code> 的返回值就可以了。</p>
<ul>
<li>(1). nutkWallFunction<figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line">tmp&lt;scalarField&gt; nutkWallFunctionFvPatchScalarField::calcNut() <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">const</span> <span class="keyword">label</span> patchi = patch().<span class="literal">index</span>();</span><br><span class="line">    <span class="keyword">const</span> turbulenceModel&amp; turbModel =</span><br><span class="line">        <span class="keyword">db</span>().lookupObject&lt;turbulenceModel&gt;(<span class="string">"turbulenceModel"</span>);</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; y = turbModel.<span class="literal">y</span>()[patchi];</span><br><span class="line">    <span class="keyword">const</span> tmp&lt;volScalarField&gt; tk = turbModel.k();</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; k = tk();</span><br><span class="line">    <span class="keyword">const</span> tmp&lt;volScalarField&gt; tnu = turbModel.nu();</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; nu = tnu();</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; nuw = nu.boundaryField()[patchi];</span><br><span class="line">    <span class="keyword">const</span> <span class="keyword">scalar</span> Cmu25 = pow025(Cmu_);</span><br><span class="line">    tmp&lt;scalarField&gt; tnutw(new scalarField(patch().size(), 0.0));</span><br><span class="line">    scalarField&amp; nutw = tnutw();</span><br><span class="line">    forAll(nutw, faceI)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">label</span> faceCellI = patch().faceCells()[faceI];</span><br><span class="line"></span><br><span class="line">        <span class="keyword">scalar</span> yPlus = Cmu25*y[faceI]*<span class="literal">sqrt</span>(k[faceCellI])/nuw[faceI];</span><br><span class="line"></span><br><span class="line">        <span class="keyword">if</span> (yPlus &gt; yPlusLam_)</span><br><span class="line">        &#123;</span><br><span class="line">            nutw[faceI] = nuw[faceI]*(yPlus*kappa_/<span class="literal">log</span>(E_*yPlus) - 1.0);</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">return</span> tnutw;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
</ul>
<p>这里，仍然是分情况处理<br><code>yPlus &lt; yPlusLam_</code> 时，壁面上的 <code>nut</code> 设为0；<br><code>yPlus &gt; yPlusLam_</code> 时<br>$$<br>\nu_t = \nu \cdot \left( \frac{\kappa y^+}{\ln(Ey^+)}-1 \right)<br>$$<br>这里实现的其实就是标准壁面函数。理论上讲，这里的计算只在粘性底层和对数区是有效的，所以，使用这个壁面条件的时候，要尽量壁面网格落在过渡区，否则可能会引入较大误差。</p>
<p>顺带提一下，这里还定义了一个 <code>yPlus</code> 函数，用来计算 $y^+$，这个函数在这里没有调用，不过在其他代码中需要 $y^+$ 的时候会调用这个函数。比如，计算 $y^+$ 的应用 <code>yPlusRAS</code> 就是调用这里的 <code>yPlus</code> 函数来计算 $y^+$。<br><figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line">tmp&lt;scalarField&gt; nutkWallFunctionFvPatchScalarField::yPlus() <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">const</span> <span class="keyword">label</span> patchi = patch().<span class="literal">index</span>();</span><br><span class="line">    <span class="keyword">const</span> turbulenceModel&amp; turbModel =</span><br><span class="line">        <span class="keyword">db</span>().lookupObject&lt;turbulenceModel&gt;(<span class="string">"turbulenceModel"</span>);</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; y = turbModel.<span class="literal">y</span>()[patchi];</span><br><span class="line"></span><br><span class="line">    <span class="keyword">const</span> tmp&lt;volScalarField&gt; tk = turbModel.k();</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; k = tk();</span><br><span class="line">    tmp&lt;scalarField&gt; kwc = k.boundaryField()[patchi].patchInternalField();</span><br><span class="line">    <span class="keyword">const</span> tmp&lt;volScalarField&gt; tnu = turbModel.nu();</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; nu = tnu();</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; nuw = nu.boundaryField()[patchi];</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> pow025(Cmu_)*y*<span class="literal">sqrt</span>(kwc)/nuw;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<ul>
<li>(2). nutUWallFunction<figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br></pre></td><td class="code"><pre><span class="line">tmp&lt;scalarField&gt; nutUWallFunctionFvPatchScalarField::calcNut() <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">const</span> <span class="keyword">label</span> patchi = patch().<span class="literal">index</span>();</span><br><span class="line">    <span class="keyword">const</span> turbulenceModel&amp; turbModel =</span><br><span class="line">        <span class="keyword">db</span>().lookupObject&lt;turbulenceModel&gt;(<span class="string">"turbulenceModel"</span>);</span><br><span class="line">    <span class="keyword">const</span> fvPatchVectorField&amp; Uw = turbModel.<span class="keyword">U</span>().boundaryField()[patchi];</span><br><span class="line">    <span class="keyword">const</span> scalarField magUp(mag(Uw.patchInternalField() - Uw));</span><br><span class="line">    <span class="keyword">const</span> tmp&lt;volScalarField&gt; tnu = turbModel.nu();</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; nu = tnu();</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; nuw = nu.boundaryField()[patchi];</span><br><span class="line">    tmp&lt;scalarField&gt; tyPlus = calcYPlus(magUp);</span><br><span class="line">    scalarField&amp; yPlus = tyPlus();</span><br><span class="line">    tmp&lt;scalarField&gt; tnutw(new scalarField(patch().size(), 0.0));</span><br><span class="line">    scalarField&amp; nutw = tnutw();</span><br><span class="line"></span><br><span class="line">    forAll(yPlus, facei)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">if</span> (yPlus[facei] &gt; yPlusLam_)</span><br><span class="line">        &#123;</span><br><span class="line">            nutw[facei] =</span><br><span class="line">                nuw[facei]*(yPlus[facei]*kappa_/<span class="literal">log</span>(E_*yPlus[facei]) - 1.0);</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">return</span> tnutw;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">tmp&lt;scalarField&gt; nutUWallFunctionFvPatchScalarField::calcYPlus</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; magUp</span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">const</span> <span class="keyword">label</span> patchi = patch().<span class="literal">index</span>();</span><br><span class="line">    <span class="keyword">const</span> turbulenceModel&amp; turbModel =</span><br><span class="line">        <span class="keyword">db</span>().lookupObject&lt;turbulenceModel&gt;(<span class="string">"turbulenceModel"</span>);</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; y = turbModel.<span class="literal">y</span>()[patchi];</span><br><span class="line">    <span class="keyword">const</span> tmp&lt;volScalarField&gt; tnu = turbModel.nu();</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; nu = tnu();</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; nuw = nu.boundaryField()[patchi];</span><br><span class="line">    tmp&lt;scalarField&gt; tyPlus(new scalarField(patch().size(), 0.0));</span><br><span class="line">    scalarField&amp; yPlus = tyPlus();</span><br><span class="line">    forAll(yPlus, facei)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">scalar</span> kappaRe = kappa_*magUp[facei]*y[facei]/nuw[facei];</span><br><span class="line">        <span class="keyword">scalar</span> yp = yPlusLam_;</span><br><span class="line">        <span class="keyword">scalar</span> ryPlusLam = 1.0/yp;</span><br><span class="line">        int iter = 0;</span><br><span class="line">        <span class="keyword">scalar</span> yPlusLast = 0.0;</span><br><span class="line">        <span class="keyword">do</span></span><br><span class="line">        &#123;</span><br><span class="line">            yPlusLast = yp;</span><br><span class="line">            yp = (kappaRe + yp)/(1.0 + <span class="literal">log</span>(E_*yp));</span><br><span class="line"></span><br><span class="line">        &#125; <span class="keyword">while</span> (mag(ryPlusLam*(yp - yPlusLast)) &gt; 0.01 &amp;&amp; ++iter &lt; 10 );</span><br><span class="line"></span><br><span class="line">        yPlus[facei] = <span class="literal">max</span>(0.0, yp);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">return</span> tyPlus;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
</ul>
<p>这个壁函数的 $y^+$ 的计算方式跟 <code>nutkWallFunction</code> 有点区别。经过摸索，这里 <code>calcYPlus</code> 函数中的那段 <code>do ... while</code> 循环的原理如下：<br>对数律可以表达如下：<br>$$<br>U^+ = \frac{U_p}{u_\tau}=\frac{1}{\kappa}\ln(Ey^+)<br>$$<br>其中 $U_p$ 等于壁面上的速度减去壁面所属网格中心的速度。<br>经过简单变形<br>$$<br>\frac{U_p}{ y u_\tau/\nu }\cdot (y/\nu)=\frac{U_p}{ y^+}\cdot (y/\nu)=\frac{1}{\kappa}\ln(Ey^+)<br>$$<br>整理得<br>$$<br>y^+ \ln(Ey^+) - \frac{\kappa y U_p}{\nu}=0<br>$$<br>这是一个 $y^+$ 的一元方程，可以通过牛顿迭代来求解<br>$$<br>y^+_{n+1} = y^+_{n} - \frac{f(y^+)}{f^{\prime}(y+)} = y^+_{n}-\frac{y_n^+ \ln(Ey_n^+) - \frac{\kappa y U_p}{\nu}}{1+\ln(Ey_n^+)} = \frac{y_n^+ + \frac{\kappa y U_p}{\nu}}{1+\ln(Ey_n^+)}<br>$$<br>上面代码里的 <code>do ... while</code> 循环，正是在做这个迭代求解，初始值选择的是 <code>yPlusLam</code>，这个值在前面提过了。<br>求出 $y^+$ 以后，$\nu_t$ 计算如下<br>$$<br>\nu_t = \nu \cdot \left( \frac{\kappa y^+}{\ln(Ey^+)}-1 \right)<br>$$<br>与 <code>nutkWallFunction</code> 形式是一样的。</p>
<p>这个壁面函数，求壁面上的 $\nu_t$ 时使用的对数律方程，所以，理论上这个壁面函数应该只适用于第一层网格落在对数层的情形。</p>
<ul>
<li>(3). nutLowReWallFunction<br>这个壁面函数直接将壁面上的 $\nu_t$ 的值设为0。<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">tmp</span>&lt;<span class="tag">scalarField</span>&gt; <span class="rule"><span class="attribute">nutLowReWallFunctionFvPatchScalarField</span>:<span class="value">:<span class="function">calcNut</span>() const</span><br><span class="line">&#123;</span><br><span class="line">    return tmp&lt;scalarField&gt;(new <span class="function">scalarField</span>(<span class="function">patch</span>().<span class="function">size</span>(), <span class="number">0.0</span>))</span></span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
</ul>
<p>$y^+$ 的计算也值得注意：<br><figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">tmp&lt;scalarField&gt; nutLowReWallFunctionFvPatchScalarField::yPlus() <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">const</span> <span class="keyword">label</span> patchi = patch().<span class="literal">index</span>();</span><br><span class="line">    <span class="keyword">const</span> turbulenceModel&amp; turbModel =</span><br><span class="line">        <span class="keyword">db</span>().lookupObject&lt;turbulenceModel&gt;(<span class="string">"turbulenceModel"</span>);</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; y = turbModel.<span class="literal">y</span>()[patchi];</span><br><span class="line">    <span class="keyword">const</span> tmp&lt;volScalarField&gt; tnu = turbModel.nu();</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; nu = tnu();</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; nuw = nu.boundaryField()[patchi];</span><br><span class="line">    <span class="keyword">const</span> fvPatchVectorField&amp; Uw = turbModel.<span class="keyword">U</span>().boundaryField()[patchi];</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> y*<span class="literal">sqrt</span>(nuw*mag(Uw.snGrad()))/nuw;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>$$<br>y^+ = \frac{y\sqrt{\nu \cdot |\frac{U_w-U_c}{d}|}}{\nu}<br>$$<br>注意由于 $\nu_t = 0$ ，所以 $\frac{\tau_w}{\rho} = \nu \cdot |\frac{U_w-U_c}{d}|$，所以，$\sqrt{\nu \cdot |\frac{U_w-U_c}{d}|}=\sqrt{\frac{\tau_w}{\rho}}=u_\tau$ 。</p>
<ul>
<li>(4). nutUSpaldingWallFunction<br>这个壁函数基于 Spalding 提出的一个拟合的 $y^+$ 与 $u^+$ 的关系式，见文献 <em>A Single Formula for the “Law of the Wall” </em> 。<br>$$<br>y^+ = u^+ + \frac{1}{E}\left[ e^{\kappa u^+} -1-\kappa u^+ -\frac{1}{2}(\kappa u^+)^2 - \frac{1}{6}(\kappa u^+)^3 \right]<br>$$<figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br></pre></td><td class="code"><pre><span class="line">tmp&lt;scalarField&gt; nutUSpaldingWallFunctionFvPatchScalarField::calcNut() <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">const</span> <span class="keyword">label</span> patchI = patch().<span class="literal">index</span>();</span><br><span class="line"></span><br><span class="line">    <span class="keyword">const</span> turbulenceModel&amp; turbModel =</span><br><span class="line">        <span class="keyword">db</span>().lookupObject&lt;turbulenceModel&gt;(<span class="string">"turbulenceModel"</span>);</span><br><span class="line">    <span class="keyword">const</span> fvPatchVectorField&amp; Uw = turbModel.<span class="keyword">U</span>().boundaryField()[patchI];</span><br><span class="line">    <span class="keyword">const</span> scalarField magGradU(mag(Uw.snGrad()));</span><br><span class="line">    <span class="keyword">const</span> tmp&lt;volScalarField&gt; tnu = turbModel.nu();</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; nu = tnu();</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; nuw = nu.boundaryField()[patchI];</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> <span class="literal">max</span></span><br><span class="line">    (</span><br><span class="line">        <span class="literal">scalar</span>(0),</span><br><span class="line">        sqr(calcUTau(magGradU))/(magGradU + ROOTVSMALL) - nuw</span><br><span class="line">    );</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">tmp&lt;scalarField&gt; nutUSpaldingWallFunctionFvPatchScalarField::calcUTau</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; magGradU</span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">const</span> <span class="keyword">label</span> patchI = patch().<span class="literal">index</span>();</span><br><span class="line"></span><br><span class="line">    <span class="keyword">const</span> turbulenceModel&amp; turbModel =</span><br><span class="line">        <span class="keyword">db</span>().lookupObject&lt;turbulenceModel&gt;(<span class="string">"turbulenceModel"</span>);</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; y = turbModel.<span class="literal">y</span>()[patchI];</span><br><span class="line"></span><br><span class="line">    <span class="keyword">const</span> fvPatchVectorField&amp; Uw = turbModel.<span class="keyword">U</span>().boundaryField()[patchI];</span><br><span class="line">    <span class="keyword">const</span> scalarField magUp(mag(Uw.patchInternalField() - Uw));</span><br><span class="line"></span><br><span class="line">    <span class="keyword">const</span> tmp&lt;volScalarField&gt; tnu = turbModel.nu();</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; nu = tnu();</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; nuw = nu.boundaryField()[patchI];</span><br><span class="line"></span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; nutw = *this;</span><br><span class="line"></span><br><span class="line">    tmp&lt;scalarField&gt; tuTau(new scalarField(patch().size(), 0.0));</span><br><span class="line">    scalarField&amp; uTau = tuTau();</span><br><span class="line"></span><br><span class="line">    forAll(uTau, faceI)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">scalar</span> ut = <span class="literal">sqrt</span>((nutw[faceI] + nuw[faceI])*magGradU[faceI]);</span><br><span class="line"></span><br><span class="line">        <span class="keyword">if</span> (ut &gt; ROOTVSMALL)</span><br><span class="line">        &#123;</span><br><span class="line">            int iter = 0;</span><br><span class="line">            <span class="keyword">scalar</span> <span class="keyword">err</span> = GREAT;</span><br><span class="line"></span><br><span class="line">            <span class="keyword">do</span></span><br><span class="line">            &#123;</span><br><span class="line">                <span class="keyword">scalar</span> kUu = <span class="literal">min</span>(kappa_*magUp[faceI]/ut, 50);</span><br><span class="line">                <span class="keyword">scalar</span> fkUu = <span class="literal">exp</span>(kUu) - 1 - kUu*(1 + 0.5*kUu);</span><br><span class="line"></span><br><span class="line">                <span class="keyword">scalar</span> f =</span><br><span class="line">                    - ut*y[faceI]/nuw[faceI]</span><br><span class="line">                    + magUp[faceI]/ut</span><br><span class="line">                    + 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu));</span><br><span class="line"></span><br><span class="line">                <span class="keyword">scalar</span> df =</span><br><span class="line">                    y[faceI]/nuw[faceI]</span><br><span class="line">                  + magUp[faceI]/sqr(ut)</span><br><span class="line">                  + 1/E_*kUu*fkUu/ut;</span><br><span class="line"></span><br><span class="line">                <span class="keyword">scalar</span> uTauNew = ut + f/df;</span><br><span class="line">                <span class="keyword">err</span> = mag((ut - uTauNew)/ut);</span><br><span class="line">                ut = uTauNew;</span><br><span class="line"></span><br><span class="line">            &#125; <span class="keyword">while</span> (ut &gt; ROOTVSMALL &amp;&amp; <span class="keyword">err</span> &gt; 0.01 &amp;&amp; ++iter &lt; 10);</span><br><span class="line"></span><br><span class="line">            uTau[faceI] = <span class="literal">max</span>(0.0, ut);</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">return</span> tuTau;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
</ul>
<p><code>calcUtau</code> 函数，其实是在用牛顿法迭代求解 $y^+$，进而得到 $u_\tau$ 的值。<code>calcNut</code> 函数中<br>$$<br>\frac{u_\tau ^2}{|\frac{U_w-U_c}{d}|} - \nu = \frac{\tau_w}{|\frac{U_w-U_c}{d}|} -\nu = \nu_{eff} - \nu = \nu_t<br>$$</p>
<p>这个壁面函数使用的是从粘性底层连续变化到对数层的 $y^+ \text{-} u^+$ 关系式，所以，这个可以认为是网格无关的，即不管第一层网格落在哪个区，都是有效的。如果网格无法做到全部位于粘性层或者对数区，建议用这个壁面条件。</p>
<ul>
<li>(5). nutUTabulatedWallFunction</li>
</ul>
<p>这个壁面函数，需要从外部读取一个 $U^+ \text{-}\,Re_y$ 数据表，通过从这个数据表插值来得到 $U^+$ 的值。其中 $Re_y=yU/\nu$ 。<br><figure class="highlight aspectj"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 构造函数</span></span><br><span class="line">nutUTabulatedWallFunctionFvPatchScalarField::</span><br><span class="line">nutUTabulatedWallFunctionFvPatchScalarField</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> fvPatch&amp; p,</span><br><span class="line">    <span class="keyword">const</span> DimensionedField&lt;scalar, volMesh&gt;&amp; iF,</span><br><span class="line">    <span class="keyword">const</span> dictionary&amp; dict</span><br><span class="line">)</span><br><span class="line">:</span><br><span class="line">    nutWallFunctionFvPatchScalarField(p, iF, dict),</span><br><span class="line">    uPlusTableName_(dict.lookup(<span class="string">"uPlusTable"</span>)),</span><br><span class="line">    uPlusTable_</span><br><span class="line">    (</span><br><span class="line">        IOobject</span><br><span class="line">        (</span><br><span class="line">            uPlusTableName_,</span><br><span class="line">            patch().boundaryMesh().mesh().time().constant(),</span><br><span class="line">            patch().boundaryMesh().mesh(),</span><br><span class="line">            IOobject::MUST_READ_IF_MODIFIED,</span><br><span class="line">            IOobject::NO_WRITE,</span><br><span class="line">            <span class="keyword">false</span></span><br><span class="line">        ),</span><br><span class="line">        <span class="keyword">true</span></span><br><span class="line">    )</span><br><span class="line">&#123;&#125;</span><br></pre></td></tr></table></figure></p>
<p>$U^+$ 和 $\nu_t$ 分别由函数 <code>calcUPlus</code> 和 <code>calcNut</code> 来计算。</p>
<figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br></pre></td><td class="code"><pre><span class="line">tmp&lt;scalarField&gt; nutUTabulatedWallFunctionFvPatchScalarField::calcNut() <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">const</span> <span class="keyword">label</span> patchi = patch().<span class="literal">index</span>();</span><br><span class="line">    <span class="keyword">const</span> turbulenceModel&amp; turbModel =</span><br><span class="line">        <span class="keyword">db</span>().lookupObject&lt;turbulenceModel&gt;(<span class="string">"turbulenceModel"</span>);</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; y = turbModel.<span class="literal">y</span>()[patchi];</span><br><span class="line">    <span class="keyword">const</span> fvPatchVectorField&amp; Uw = turbModel.<span class="keyword">U</span>().boundaryField()[patchi];</span><br><span class="line">    <span class="keyword">const</span> scalarField magUp(mag(Uw.patchInternalField() - Uw));</span><br><span class="line">    <span class="keyword">const</span> scalarField magGradU(mag(Uw.snGrad()));</span><br><span class="line">    <span class="keyword">const</span> tmp&lt;volScalarField&gt; tnu = turbModel.nu();</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; nu = tnu();</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; nuw = nu.boundaryField()[patchi];</span><br><span class="line">    <span class="literal">return</span></span><br><span class="line">        <span class="literal">max</span></span><br><span class="line">        (</span><br><span class="line">            <span class="literal">scalar</span>(0),</span><br><span class="line">            sqr(magUp/(calcUPlus(magUp*y/nuw) + ROOTVSMALL))</span><br><span class="line">           /(magGradU + ROOTVSMALL)</span><br><span class="line">          - nuw</span><br><span class="line">        );</span><br><span class="line">    <span class="comment">// magUp/UPlus = utau, sqr(utau) = tauw, tauw/magGradU = nuEff = nut + nu</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">tmp&lt;scalarField&gt; nutUTabulatedWallFunctionFvPatchScalarField::calcUPlus</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; Rey</span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    tmp&lt;scalarField&gt; tuPlus(new scalarField(patch().size(), 0.0));</span><br><span class="line">    scalarField&amp; uPlus = tuPlus();</span><br><span class="line">    forAll(uPlus, faceI)</span><br><span class="line">    &#123;</span><br><span class="line">        uPlus[faceI] = uPlusTable_.interpolateLog10(Rey[faceI]);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">return</span> tuPlus;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>注意这里 <code>calcUPlus</code> 用的是 <code>interpolateLog10</code> 函数来插值，这个函数的定义为<br><figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line">template&lt;<span class="keyword">class</span> <span class="keyword">Type</span>&gt;</span><br><span class="line"><span class="keyword">Type</span> Foam::uniformInterpolationTable&lt;<span class="keyword">Type</span>&gt;::interpolateLog10</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">scalar</span> x</span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">if</span> (log10_)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">if</span> (x &gt; 0)</span><br><span class="line">        &#123;</span><br><span class="line">            x = ::<span class="literal">log10</span>(x);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">else</span> <span class="keyword">if</span> (bound_ &amp;&amp; (x &lt;= 0))</span><br><span class="line">        &#123;</span><br><span class="line">            x = x0_;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">else</span></span><br><span class="line">        &#123;</span><br><span class="line">            FatalErrorIn</span><br><span class="line">            (</span><br><span class="line">                <span class="string">"uniformInterpolationTable&lt;Type&gt;::interpolateLog10(scalar x)"</span></span><br><span class="line">            )   &lt;&lt; <span class="string">"Table "</span> &lt;&lt; name() &lt;&lt; <span class="keyword">nl</span></span><br><span class="line">                &lt;&lt; <span class="string">"Supplied value must be greater than 0 when in log10 mode"</span></span><br><span class="line">                &lt;&lt; <span class="keyword">nl</span> &lt;&lt; <span class="string">"x="</span> &lt;&lt; x &lt;&lt; <span class="keyword">nl</span> &lt;&lt; <span class="keyword">exit</span>(FatalError);</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">return</span> interpolate(x); <span class="comment">// 这个是普通的线性插值函数</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>即计算 <code>x</code> 的对数（log10），在将计算结果用来进行线性插值。所以，用这个壁面函数的时候，要注意你所提供的数据表是普通线性坐标的还是对数坐标的。</p>
<p>基本上常见的处理壁面上的湍流粘度的方法就是以上几种了。OpenFOAM 中还提供了几个能处理粗糙壁面的壁面函数( <code>nutURoughWallFunction</code> ， <code>nutkRoughWallFunction</code> )，以及处理大气层边界的(<code>nutkAtmRoughWallFunction</code>，需要跟 <code>atmBoundaryLayerInletVelocity</code> 这个入口边界配合使用 )，细节这里不再详述了，有需要时可以去看相关代码，代码结构是类似的，只是具体计算公式不一样。</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://xiaopingqiu.github.io/2016/04/25/wallFunctions4/" data-id="cj2lay2zo0001kkmbl6kv0e67" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Code-Explained/">Code Explained</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/wall-functions/">wall functions</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2016/05/03/liggghts-howto/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          LIGGGHTS tips
        
      </div>
    </a>
  
  
    <a href="/2016/04/25/wallFunctions3/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">OpenFOAM 中的壁面函数（三）</div>
    </a>
  
</nav>

  
</article>


<section id="comments">
  <!-- 多说评论框 start -->
  <div class="ds-thread" data-thread-key="post-wallFunctions4" data-title="OpenFOAM 中的壁面函数（四）" data-url="http://xiaopingqiu.github.io/2016/04/25/wallFunctions4/"></div>
  <!-- 多说评论框 end -->
  <!-- 多说公共JS代码 start (一个网页只需插入一次) -->
  <script type="text/javascript">
  var duoshuoQuery = {short_name:"xiaopingqiu"};
	(function() {
		var ds = document.createElement('script');
		ds.type = 'text/javascript';ds.async = true;
		ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
		ds.charset = 'UTF-8';
		(document.getElementsByTagName('head')[0] 
		 || document.getElementsByTagName('body')[0]).appendChild(ds);
	})();
	</script>
  <!-- 多说公共JS代码 end -->
</section>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/C/">C++</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/DEM/">DEM</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/OpenFOAM/">OpenFOAM</a><span class="category-list-count">44</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Paraview/">Paraview</a><span class="category-list-count">5</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/swak4Foam/">swak4Foam</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/test/">test</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/vim/">vim</a><span class="category-list-count">1</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Boundary-conditions/">Boundary conditions</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/C/">C++</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/CentOS/">CentOS</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Code-Explained/">Code Explained</a><span class="tag-list-count">29</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/LES/">LES</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/LIGGGHTS/">LIGGGHTS</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/ODE/">ODE</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/OpenFOAM/">OpenFOAM</a><span class="tag-list-count">20</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Postprocessing/">Postprocessing</a><span class="tag-list-count">9</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Preprocessing/">Preprocessing</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/RTS/">RTS</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/TIL/">TIL</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Windows/">Windows</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/fvOptions/">fvOptions</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/groovyBC/">groovyBC</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/paraview/">paraview</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/test/">test</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/thermophysicalModels/">thermophysicalModels</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/turbulence-model/">turbulence model</a><span class="tag-list-count">7</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vim/">vim</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/wall-functions/">wall functions</a><span class="tag-list-count">4</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/Boundary-conditions/" style="font-size: 15.56px;">Boundary conditions</a><a href="/tags/C/" style="font-size: 11.11px;">C++</a><a href="/tags/CentOS/" style="font-size: 10px;">CentOS</a><a href="/tags/Code-Explained/" style="font-size: 20px;">Code Explained</a><a href="/tags/LES/" style="font-size: 10px;">LES</a><a href="/tags/LIGGGHTS/" style="font-size: 10px;">LIGGGHTS</a><a href="/tags/ODE/" style="font-size: 10px;">ODE</a><a href="/tags/OpenFOAM/" style="font-size: 18.89px;">OpenFOAM</a><a href="/tags/Postprocessing/" style="font-size: 17.78px;">Postprocessing</a><a href="/tags/Preprocessing/" style="font-size: 11.11px;">Preprocessing</a><a href="/tags/RTS/" style="font-size: 12.22px;">RTS</a><a href="/tags/TIL/" style="font-size: 10px;">TIL</a><a href="/tags/Windows/" style="font-size: 10px;">Windows</a><a href="/tags/fvOptions/" style="font-size: 11.11px;">fvOptions</a><a href="/tags/groovyBC/" style="font-size: 10px;">groovyBC</a><a href="/tags/paraview/" style="font-size: 10px;">paraview</a><a href="/tags/test/" style="font-size: 11.11px;">test</a><a href="/tags/thermophysicalModels/" style="font-size: 14.44px;">thermophysicalModels</a><a href="/tags/turbulence-model/" style="font-size: 16.67px;">turbulence model</a><a href="/tags/vim/" style="font-size: 10px;">vim</a><a href="/tags/wall-functions/" style="font-size: 13.33px;">wall functions</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/05/">五月 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/08/">八月 2016</a><span class="archive-list-count">8</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/06/">六月 2016</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/05/">五月 2016</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/04/">四月 2016</a><span class="archive-list-count">12</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/03/">三月 2016</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/12/">十二月 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/11/">十一月 2015</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/10/">十月 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/09/">九月 2015</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/08/">八月 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/06/">六月 2015</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/05/">五月 2015</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/04/">四月 2015</a><span class="archive-list-count">2</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recents</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2017/05/12/duoshuoAnnouncement/">多说评论系统将停止提供服务</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewScritps/">Paraview 脚本一例</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewCamera/">Paraview 中有关 Camera 的操作两例</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewCustomFilter/">Paraview 中创建 Custom Filter</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewStreamLineOnSlice/">在 Paraview 中画截面上的流线</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2017 Giskard Q.<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

<script src="//dn-lbstatics.qbox.me/lbservice/busuanzi/2.0/busuanzi.mini.js"/></script>

    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
    <a href="/atom.xml" class="mobile-nav-link">Rss</a>
  
    <a href="/about" class="mobile-nav-link">About</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css">
  <script src="/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script>


<script src="/js/script.js" type="text/javascript"></script>

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-62501686-1', 'auto');
  ga('send', 'pageview');

</script>

  </div>
<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</body>
</html>